<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <h1>count:{{count}}</h1>
        <button @click="count++">++</button>
        <hr>
        <my-count v-for="item of 3" :title="item"></my-count>



    </div>
</body>
</html>
<script src="../vue.js"></script>
<script>
     Vue.component('my-count',{
         template:`<div><h1><b>{{title}}</b>-count:{{count}}</h1>
        <button @click="count++">++</button></div>`,
         data() {
             return {
                 count:100
             }
         },
         props:['title']
     });

    const app = new Vue({
        el:'#app',
        data:{
            count:0
        }

        
    })  
</script>